//
//  ByNetNewsModel.m
//  jmsfhz_ios
//
//  Created by pro on 16/7/28.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "ByNetNewsModel.h"


@implementation ByNetNewsModel

- (void)setAttributes:(NSDictionary *)jsonDic {
    
    [super setAttributes:jsonDic];
    
    NSMutableArray *temp = [[NSMutableArray alloc] init];
    for (NSDictionary *dic in jsonDic[@"result"]) {
        ByNetNewsItemModel *item = [[ByNetNewsItemModel alloc] initContentWithDic:dic];
        [temp addObject:item];
    }
    self.results = [temp copy];
    
}
@end


@implementation ByNetNewsItemModel

- (void)setAttributes:(NSDictionary *)jsonDic {
    
    [super setAttributes:jsonDic];
    
    self.post_date = [NSDate getDateForStringFotmatWithTimeInterval:[jsonDic[@"post_date"] doubleValue] formatter:@"yyyy-MM-dd HH:mm"];
    self.main_img = [NSString stringWithFormat:@"%@?id=%@", BOYE_PICTURE_VIEW_URL, jsonDic[@"main_img"]];
    NSLog(@"1111111111:%@", self.main_img);

}
@end
